/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package primenumber;

/**
 *
 * @author hhl
 */
public class PrimeNumber {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int i,j;
        for(i=2;i<=100;i++){
            for(j=2;j<Math.sqrt(i);j++){
                if(i%j==0)
                break;
            }
            if(j>Math.sqrt(i)){
                System.out.println(i+"是素数");
            }
            else
                System.out.println(i+"不是素数");
        }
    }

}

